<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style>
		#div1 {
			width: 100px;
			height: 100px;
			background: red;
			position: fixed;
			right: 0;
			top: 50%;
			margin-top: -50px;
		}	
	</style>
</head>
<body style='height:2000px;'>
<div id='div1'>
	
</div>
</body>
</html>